<?php

use think\migration\Seeder;

class SystemUserLoginLog extends Seeder
{
    /**
     * Run Method.
     * Write your database seeder using this method.
     * More information on writing seeders is available here:
     * http://docs.phinx.org/en/latest/seeding.html
     */
    public function run()
    {
        $table = $this->table('system_user_login_log');
        $rows  = [
            [
                // step1：用户信息
                'login_user_id' => 1,
                'username'      => 'huanxin',
                // step2:登录IP信息
                'ip'            => '127.0.0.1',
                // step3:登录时间
                'login_time'   => time(),
            ],
            [
                'login_user_id' => 1,
                'username'      => 'huanxin',
                'ip'            => '127.0.0.2',
                'login_time'   => time(),
            ],
        ];
        $table->insert($rows)->save();
    }
}